import {CLASS} from '@/services/api'
import {request, METHOD} from '@/utils/request'

export async function listClassByPage(currentPage, size) {
    return request(CLASS, METHOD.GET, {
        currentPage: currentPage,
        size: size
    })
}

export async function totalClass() {
    return request(CLASS+"/total", METHOD.GET)
}

export async function deleteClass(id) {
    return request(CLASS, METHOD.DELETE, {
        id: id
    })
}

export async function editClass(clazz) {
    return request(CLASS, METHOD.POST, {
        id: clazz.id,
        majorId: clazz.majorId,
        grade: clazz.grade,
        classNum: clazz.classNum,
        peopleNum: clazz.peopleNum
    })
}
